<div id="page-heading">
	<h1>{$title}</h1><br>
       
      
</div>
<script>
    
	$(function() {ldelim}
		$( "#tabs" ).tabs();
                //$("#tabs").tabs('load',current_index);
	{rdelim});


 $(function() {ldelim}
	$('.ordertable').dataTable({ldelim}
                "bJQueryUI": true,
                "sPaginationType": "full_numbers",
                "bPaginate": true,
		"bLengthChange": true,
		"bFilter": true,
		"bSort": true,
		"bInfo": true,
		"bAutoWidth": true,
                "bStateSave": true,
                "iCookieDuration":120,
                 "aaSorting": [[ 0, "desc" ]]

{rdelim});
{rdelim});
</script>
<div id="tabs">
	<ul>
		<li><a href="#tabs-1">Orders - Pending Delivery</a></li>
		<li><a href="#tabs-2">Orders- On Delivery</a></li>
                <li><a href="#tabs-3">Paid Orders - Pending Delivery</a></li>
                 <li><a href="#tabs-4">Orders-Delivery Confirmed </a></li>
                 <li><a href="#tabs-5"> Orders-Rejected</a></li>
	</ul>
	<div id="tabs-1">
<div align="center">
	<table border="0" width="100%" cellpadding="0" cellspacing="0" class="ordertable" id="ordertable">
            <thead>
		<tr>
			<th width="5%" align="center" class="table-header-repeat line-left">OrderID</th>
			<th width="20%" align="center" class="table-header-repeat line-left">Order Date</th>
			<th width="4%" class="table-header-repeat line-left">Name</th>
			<th width="9%" class="table-header-repeat line-left">Email</th>
			<th width="9%" class="table-header-repeat line-left">Is Paid</th>
			<th width="3%" class="table-header-repeat line-left">Is delivered</th>
			<th width="2%" class="table-header-repeat line-left">&nbsp;</th>			
			<th width="2%" class="table-header-repeat line-left">&nbsp;</th>			
                        <th width="2%" class="table-header-repeat line-left">&nbsp;</th>
		</tr>
               </thead>
               <tbody>
		{section name=sec1 loop=$item_arr_not_processed}
		<tr>
			<td>{$item_arr_not_processed[sec1].order_id}</td>
			<td>{$item_arr_not_processed[sec1].order_date}</td>
			<td>{$item_arr_not_processed[sec1].user_firstname}&nbsp;{$item_arr[sec1].user_lastname}</td>
			<td>{$item_arr_not_processed[sec1].user_email}</td>
			<td>{$item_arr_not_processed[sec1].ispaid}</td>
			<td>{$item_arr_not_processed[sec1].isdelivered}</td>
                        <td><a href="javascript: void(0);" onclick="loadPage('order/view/{$item_arr_not_processed[sec1].order_id}');"><img src="images/icons/settings.gif" width="20" height="20" /></a></td>
                        <td><a href="javascript: void(0);" onclick="openPrintWindow('{$admintpl}printinvoice.php?orderid={$item_arr_not_processed[sec1].order_id}','printwin', 0, 0, 0, 650, 600);"><img src="images/icons/print.gif" width="20" height="20" /></a></td>
                         <td><a href="javascript: void(0);"  onclick="cancelorder({$item_arr_not_processed[sec1].order_id});"><img alt="cancel" src="images/icons/disable.gif" width="20" height="20" /></a></td>
		</tr>
		{/section}
                 </tbody>
	</table>
	
</div>
</div>
    <div id="tabs-2">

<div align="center">
	<table border="0" width="98%" cellpadding="0" cellspacing="0" class="ordertable" id="ordertable">
            <thead> 
		<tr>
			<th width="5%" align="center" class="table-header-repeat line-left">OrderID</th>
			<th width="20%" align="center" class="table-header-repeat line-left">Order Date</th>
			<th width="4%" class="table-header-repeat line-left">User Name</th>
			<th width="9%" class="table-header-repeat line-left">Email</th>
			<th width="9%" class="table-header-repeat line-left">Is Paid</th>
			<th width="3%" class="table-header-repeat line-left">Is delivered</th>
			<th width="2%" class="table-header-repeat line-left">&nbsp;</th>
			<th width="2%" class="table-header-repeat line-left">&nbsp;</th>
                       
		</tr>
                </thead>
                <tbody>
		{section name=sec1 loop=$item_arr_delivered_notpaid}
		<tr>
			<td>{$item_arr_delivered_notpaid[sec1].order_id}</td>
			<td>{$item_arr_delivered_notpaid[sec1].order_date}</td>
			<td>{$item_arr_delivered_notpaid[sec1].user_firstname}&nbsp;{$item_arr_delivered_notpaid[sec1].user_lastname}</td>
			<td>{$item_arr_delivered_notpaid[sec1].user_email}</td>
			<td>{$item_arr_delivered_notpaid[sec1].ispaid}</td>
			<td>{$item_arr_delivered_notpaid[sec1].isdelivered}</td>
                        <td><a href="javascript: void(0);" onclick="loadPage('order/view/{$item_arr_delivered_notpaid[sec1].order_id}');"><img src="images/icons/settings.gif" width="20" height="20" /></a></td>
                        <td><a href="javascript: void(0);" onclick="openPrintWindow('{$admintpl}printinvoice.php?orderid={$item_arr_delivered_notpaid[sec1].order_id}','printwin', 0, 0, 0, 650, 600);"><img src="images/icons/print.gif" width="20" height="20" /></a></td>
                        
		</tr>
		{/section}
                 </tbody>
	</table>

</div>
    

    </div>
    <div id="tabs-3">

        <div align="center">
	<table border="0" width="98%" cellpadding="0" cellspacing="0" class="ordertable" id="ordertable">
            <thead>
		<tr>
			<th width="5%" align="center" class="table-header-repeat line-left">OrderID</th>
			<th width="20%" align="center" class="table-header-repeat line-left">Order Date</th>
			<th width="4%" class="table-header-repeat line-left">User Name</th>
			<th width="9%" class="table-header-repeat line-left">Email</th>
			<th width="9%" class="table-header-repeat line-left">Is Paid</th>
			<th width="3%" class="table-header-repeat line-left">Is delivered</th>
			<th width="2%" class="table-header-repeat line-left">&nbsp;</th>
			<th width="2%" class="table-header-repeat line-left">&nbsp;</th>
                   
		</tr>
                </thead>
                <tbody>
		{section name=sec1 loop=$item_arr_paid_notdelivered}
		<tr>
			<td>{$item_arr_paid_notdelivered[sec1].order_id}</td>
			<td>{$item_arr_paid_notdelivered[sec1].order_date}</td>
			<td>{$item_arr_paid_notdelivered[sec1].user_firstname}&nbsp;{$item_arr_paid_notdelivered[sec1].user_lastname}</td>
			<td>{$item_arr_paid_notdelivered[sec1].user_email}</td>
			<td>{$item_arr_paid_notdelivered[sec1].ispaid}</td>
			<td>{$item_arr_paid_notdelivered[sec1].isdelivered}</td>
                        <td><a href="javascript: void(0);" onclick="loadPage('order/view/{$item_arr_paid_notdelivered[sec1].order_id}');"><img src="images/icons/settings.gif" width="20" height="20" /></a></td>
                        <td><a href="javascript: void(0);" onclick="openPrintWindow('{$admintpl}printinvoice.php?orderid={$item_arr_paid_notdelivered[sec1].order_id}','printwin', 0, 0, 0, 650, 600);"><img src="images/icons/print.gif" width="20" height="20" /></a></td>
                        
		</tr>
		{/section}
                </tbody>
	</table>

</div>


    

    </div>
    <div id="tabs-4">
    <div align="center">
	<table border="0" width="98%" cellpadding="0" cellspacing="0" class="ordertable" id="ordertable">
            <thead>
		<tr>
			<th width="5%" align="center" class="table-header-repeat line-left">OrderID</th>
			<th width="20%" align="center" class="table-header-repeat line-left">Order Date</th>
			<th width="4%" class="table-header-repeat line-left">User Name</th>
			<th width="9%" class="table-header-repeat line-left">Email</th>
			<th width="9%" class="table-header-repeat line-left">Is Paid</th>
			<th width="3%" class="table-header-repeat line-left">Is delivered</th>
			<th width="2%" class="table-header-repeat line-left">&nbsp;</th>
			<th width="2%" class="table-header-repeat line-left">&nbsp;</th>

		</tr>
              </thead>
              <tbody>
		{section name=sec1 loop=$item_arr_completed}
		<tr>
			<td>{$item_arr_completed[sec1].order_id}</td>
			<td>{$item_arr_completed[sec1].order_date}</td>
			<td>{$item_arr_completed[sec1].user_firstname}&nbsp;{$item_arr_completed[sec1].user_lastname}</td>
			<td>{$item_arr_completed[sec1].user_email}</td>
			<td>{$item_arr_completed[sec1].ispaid}</td>
			<td>{$item_arr_completed[sec1].isdelivered}</td>
                        <td><a href="javascript: void(0);" onclick="loadPage('order/view/{$item_arr_completed[sec1].order_id}');"><img src="images/icons/settings.gif" width="20" height="20" /></a></td>
                        <td><a href="javascript: void(0);" onclick="openPrintWindow('{$admintpl}printinvoice.php?orderid={$item_arr_completed[sec1].order_id}','printwin', 0, 0, 0, 650, 600);"><img src="images/icons/print.gif" width="20" height="20" /></a></td>
                         
		</tr>
		{/section}
                 </tbody>
	</table>

</div>

  

    </div>
    <div id="tabs-5">

        <div align="center">
	<table border="0" width="98%" cellpadding="0" cellspacing="0" class="ordertable" >
            <thead>
		<tr>
			<th width="5%" align="center" class="table-header-repeat line-left">OrderID</th>
			<th width="20%" align="center" class="table-header-repeat line-left">Order Date</th>
			<th width="4%" class="table-header-repeat line-left">User Name</th>
			<th width="9%" class="table-header-repeat line-left">Email</th>

			<th width="2%" class="table-header-repeat line-left">&nbsp;</th>

		</tr>
                </thead>
                <tbody>

		{section name=sec1 loop=$item_arr_cancelled}
		<tr>
			<td>{$item_arr_cancelled[sec1].order_id}</td>
			<td>{$item_arr_cancelled[sec1].order_date}</td>
			<td>{$item_arr_cancelled[sec1].user_firstname}&nbsp;{$item_arr_cancelled[sec1].user_lastname}</td>
			<td>{$item_arr_cancelled[sec1].user_email}</td>
 
                       
                        <td><a href="javascript: void(0);" onclick="openPrintWindow('{$admintpl}printinvoice.php?orderid={$item_arr_cancelled[sec1].order_id}','printwin', 0, 0, 0, 650, 600);"><img src="images/icons/print.gif" width="20" height="20" /></a></td>

		</tr>
		{/section}
                </tbody>
	</table>

</div>


</div>
</div>